how to load a constructor at run time